package phase01.module1.code;

/**
 * 5. 使用双重循环实现五子棋游戏棋盘的绘制， 棋盘界面的具体效果如下：
 */
public class FIR {
    public static void main(String[] args) {
        for (int row = -1; row <= 15; row++) {
            if (row == -1) {
                System.out.print("  ");
            }
            for (int col = 0; col <= 15; col++) {
                if (row == -1) {
                    System.out.print(Integer.toString(col, 16) + " ");
                } else {
                    if (col == 0) {
                        System.out.print(Integer.toString(row, 16) + " ");
                    } else {
                        System.out.print("+ ");
                    }
                }
            }
            if (row > -1) {
                System.out.print("+ ");
            }
            System.out.println();
        }
    }
}
